<template>
  <!-- 猜你喜欢 -->
  <div class="house-detail-recommend">
    <div class="house-title">猜你喜欢</div>
    <div class="recommend-items">
      <div
        class="item-house"
        v-for="(item, index) in guessYouLike"
        :key="index"
      >
        <div>
          <img class="img" :src="imgBase + item.imgSrc" alt="" />
        </div>
        <div class="item-content">
          <h3 class="item-title item">{{ item.title }}</h3>
          <div class="item-desc item">{{ item.desc }}</div>
          <div>
            <span class="item-tag">{{ item.tag }}</span>
          </div>
          <div class="item-price">
            <span class="item-price-num">{{ item.price }}</span
            >元/月
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Recommend',
  data() {
    return {
      imgBase: 'http://liufusong.top:8080',
      guessYouLike: [
        {
          imgSrc: '/img/message/1.png',
          title: '安贞西里 3室1厅',
          desc: '72.32m²/南 北/低楼层',
          tag: '随时看房',
          price: '4500'
        },
        {
          imgSrc: '/img/message/2.png',
          title: '天居园 2室1厅',
          desc: '83m²/南/高楼层',
          tag: '近地铁',
          price: '7200'
        },
        {
          imgSrc: '/img/message/3.png',
          title: '角门甲4号院 1室1厅',
          desc: '52m²/西南/低楼层',
          tag: '集中供暖',
          price: '4300'
        }
      ]
    }
  }
}
</script>

<style scoped lang="less">
.house-detail-recommend {
  margin: 10px 0 0;
  padding: 0 15px;
  background: #fff;
  .recommend-items {
    .item-house {
      display: flex;
      height: 120px;
      padding-top: 18px;
      border-bottom: 1px solid #e5e5e5;
      .img {
        width: 106px;
        height: 80px;
      }
      .item-content {
        line-height: 22px;
        padding-left: 12px;
        .item {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          vertical-align: middle;
        }
        .item-title {
          margin: 0;
          font-size: 15px;
          color: #394043;
        }
        .item-desc {
          font-size: 12px;
          color: #afb2b3;
        }
        .item-tag {
          color: #39becd;
          background: #e1f5f8;
          display: inline-block;
          font-size: 12px;
          border-radius: 3px;
          padding: 4px 5px;
          margin-right: 5px;
          line-height: 12px;
        }
        .item-price {
          font-size: 12px;
          color: #fa5741;
          .item-price-num {
            font-size: 16px;
            font-weight: bolder;
          }
        }
      }
    }
  }
}
.house-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
  padding: 15px 0;
  border-bottom: 1px solid #cecece;
}
</style>
